package city.spring.modules.material.vo;

import city.spring.modules.material.entity.MaterialwarehousingEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 实体类：物资入库
 *
 * @author 谢金婷
 * @date 2020-07-17 13:41:43
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class MaterialwarehousingVO extends MaterialwarehousingEntity {

    /**
     * 该物资入库关联的货架列表信息
     */
    private List<MaterialwarehousingMaterialVO> materials;

    public MaterialwarehousingVO(MaterialwarehousingEntity entity) {
        super.setId(entity.getId());
        super.setMaterialSource(entity.getMaterialSource());
        super.setStorehouseId(entity.getStorehouseId());
        super.setSname(entity.getSname());
        super.setWarehousingdate(entity.getWarehousingdate());
        super.setUserId(entity.getUserId());
        super.setName(entity.getName());
        super.setGmtCreate(entity.getGmtCreate());
        super.setGmtModified(entity.getGmtModified());
        super.setRegistrant(entity.getRegistrant());
        super.setRegistrantname(entity.getRegistrantname());
        super.setRemark(entity.getRemark());
    }

    @Override
    public String toString() {
        return super.toString();
    }

}